<span class="btn btn-default btn-file">
    Upload
    <input type="file" class="form-control" required accept="img/*" id="fieldPhoto" data-url="/upload" multiple name="photo">
</span>
<div id="uploads">
</div>

    <script src="/vendor/jqfu/js/vendor/jquery.ui.widget.js"></script>
    <script src="/vendor/jqfu/js/jquery.iframe-transport.js"></script>
    <script src="/vendor/jqfu/js/jquery.fileupload.js"></script>
    <script>
        $(document).ready(function() {
            $('#fieldPhoto').fileupload({
                dataType: 'json',
                done: function(e, data){
                    $.each(data.result.files, function(index, file){
                        $('#fileUploads').html(
                            '<div class="upload">' +
                                '<span class="gluyphicon glyphicon-ok"></span>' +
                                '&nbsp;' + file.originalName +
                            '</div>'
                        )
                    })
                }
            })
        })
    </script>
